package cn.shopifymall.hw_od;

import java.util.Scanner;

/**
 * @Author 孤风雪影
 * @Email gitee.com/efairy520
 * @Date 2023/3/14 22:03
 * @Version 1.0
 */
public class HJ6 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int bigNum = in.nextInt();
        Long k = (long) Math.sqrt(bigNum);
        for (int i = 2; i <= k; i++) {
            while (bigNum % i == 0) {
                System.out.print(i + " ");
                bigNum /= i;
            }
        }
        // 余1，正常结束，余自己，本身就是质数
        System.out.println(bigNum == 1 ? "" : bigNum + " ");
    }
}
